package com.oasystem.web.webbean.fund;

import com.oasystem.domain.fund.AppropriationApplication;
import com.oasystem.domain.user.User;
import com.oasystem.enums.EApproveStatus;

public class AppropriationApproveWebBean {
	private String id;
	private String reason;
	private String amount;
	private String approver;
	private String applicantId;

	public AppropriationApplication build() {
		AppropriationApplication domain = new AppropriationApplication();
		domain.setAmount(Double.valueOf(amount));
		//TODO: get from session
		domain.setApplicantId("1");
		domain.setReason(reason);
		domain.setApprover(new User(this.approver));
		domain.setApproveStatus(EApproveStatus.IN_PROGRESS);
		return domain;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}

	public String getApprover() {
		return approver;
	}

	public void setApprover(String approver) {
		this.approver = approver;
	}

	public String getApplicantId() {
		return applicantId;
	}

	public void setApplicantId(String applicantId) {
		this.applicantId = applicantId;
	}

}
